﻿<%@ Page Language="C#" MasterPageFile="~/Theme/Stander/Stander.master" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Finance_Report" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    选择年份：
    <asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlYear_SelectedIndexChanged">
    </asp:DropDownList><br />
    <br />
    <asp:DataList ID="dlQuartersList" runat="server" Width="100%" GridLines="None">
        <ItemTemplate>
            <h2 class="pagetitle">第<%# Container.DataItem%>季度</h2>
            <asp:GridView ID="gvMonthOfBills" runat="server"  DataSource='<%# GetQuarterDetails((int)Container.DataItem) %>' Width="100%" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="Horizontal" ShowFooter="True" BorderStyle="Dotted" Font-Size="10pt" OnRowDataBound="gvMonthOfBills_RowDataBound">
                <FooterStyle BackColor="#4D84B0" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:TemplateField FooterText="合计：" HeaderText="月份">
                        <ItemTemplate>
                            <asp:Label ID="lblMonth" runat="server" Text='<%# String.Format("{0:MMMM}", DataBinder.Eval(Container.DataItem, "OrderDate"))%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="清单数量" DataField="BillsCount" />
                    <asp:BoundField HeaderText="应收款" DataField="Income" />
                    <asp:BoundField HeaderText="实收款" DataField="RealIncome" />
                    <asp:BoundField HeaderText="应付款" DataField="Payout" />
                    <asp:BoundField HeaderText="实付款" DataField="RealPayout" />
                    <asp:BoundField DataField="Gain" HeaderText="应得利润" />
                    <asp:BoundField HeaderText="实际利润" DataField="RealGain" />
                </Columns>
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <EditRowStyle BackColor="#999999" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#6285A4" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <EmptyDataTemplate>
                    &nbsp;<asp:Label ID="Label1" runat="server" ForeColor="#F98E40" Text="该年份的这个季度没有记录！"></asp:Label>
                </EmptyDataTemplate>
            </asp:GridView>
            
            <br /><br />
        </ItemTemplate>
    </asp:DataList><br />
    <br />
</asp:Content>

